import * as echarts from 'echarts';

export const znjkOptions = {
    // backgroundColor: "rgba(19, 52, 89, .5)",
    tooltip: {
      trigger: "axis",
      axisPointer: {
        type: "shadow",
      },
      backgroundColor: "rgba(9, 24, 48, 0.5)",
      borderColor: "rgba(75, 253, 238, 0.4)",
      textStyle: {
        color: "#CFE3FC",
      },
      borderWidth: 1,
      formatter: function (params) {
        let str = "";
        for (let i = 0; i < params.length; i++) {
          if (i == 0) {
            str += `${params[i].name}<br/>${params[i].seriesName.slice(
              0,
              params[i].seriesName.indexOf("(")
            )}<br/>$<span>${params[0].data}</span><br/>`;
            continue;
          }
          str += `${params[i].seriesName.slice(
            0,
            params[i].seriesName.indexOf("(")
          )}<br/>$<span>${params[i].data}</span><br/>`;
        }
        return str;
      },
    },
  
    grid: {
      left: "0px",
      right: "0px",
      top: "30px",
      bottom: "20px",
      containLabel: true,
    },
  
    xAxis: [
      {
        type: "category",
        boundaryGap: true,
        axisTick: {
          show: false,
        },
        data: [
          "2024-01",
          "2024-02",
          "2024-03",
          "2024-04",
          "2024-05",
          "2024-06",
          "2024-07",
          "2024-08",
          "2024-09",
          "2024-10",
          "2024-11",
          "2024-12",
        ],
        axisLine: {
          lineStyle: {
            color: "rgba(51, 176, 255, 1)",
          },
        },
        axisLabel: {
          interval: 0,
          color: "rgba(85,88,90, 1)",
          fontSize: 8,
        },
      },
    ],
    yAxis: [
  
      {
          axisLabel: {
              show: false // 确保刻度标签显示
          },
        splitLine: {
          show: false,
          lineStyle: {
            color: "rgba(39, 57, 75, 1)",
            width: 1,
            type: "solid",
          },
        },
      },
      {
        splitLine: {
          show: false,
          lineStyle: {
            color: "rgba(39, 57, 75, 1)",
            width: 1,
            type: "solid",
          },
        },
      },
    ],
    series: [
  
      {
        type: "bar",
  
        yAxisIndex: 0,
        name: "金钱01",
        itemStyle: {
          normal: {
            color: new echarts.graphic.LinearGradient(
              0,
              0,
              0,
              1,
              [
                {
                  offset: 0,
                  color: "rgba(99,176,255, 1)",
                },
                {
                  offset: 1,
                  color: "rgba(162,226,253, 0)",
                },
              ],
              false
            ),
          },
        },
        barWidth: 24,
        data: [15, 20, 25, 32, 20, 12, 30, 12, 23,15, 20, 25],
      },
  
      {
        name: "金钱02",
        yAxisIndex: 0,
        type: "line",
        smooth: true,
  
        areaStyle: {
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            {
              offset: 0,
              color: "rgba(98, 227, 255, 1)",
            },
            {
              offset: 1,
              color: "rgba(98, 227, 255, 0)",
            },
          ]),
        },
        data: [55, 50, 59, 42, 66, 73, 54, 63, 45, 54, 63, 45],
        symbol: "circle",
        symbolSize: 4,
        itemStyle: {
          normal: {
            color: "#FFFFFF",
            borderColor: "rgba(158,190,232, 1)",
            lineStyle: {
              color: "rgba(158,190,232, 1)",
            },
          },
        },
      },
      {
        name: "金钱03",
        yAxisIndex: 0,
        type: "line",
        smooth: true,
  
        areaStyle: {
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            {
              offset: 0,
              color: "rgba(98, 227, 255, 1)",
            },
            {
              offset: 1,
              color: "rgba(98, 227, 255, 0)",
            },
          ]),
        },
        data: [80, 82, 86, 90, 76, 86, 93, 82, 87, 90, 76, 74],
        symbol: "circle",
        symbolSize: 4,
        itemStyle: {
          normal: {
            color: "#FFFFFF",
            borderColor: "rgba(149,159,202, 1)",
            lineStyle: {
              color: "rgba(149,159,202, 1)",
            },
          },
        },
      },
  
    ],
  };